<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue Click Example</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
    <style>
        .container {
            display: flex;
        }
        .box {
            width: 100px;
            height: 100px;
            border: 1px solid #ccc;
            margin: 10px;
            position: relative;
        }
        .box::after {
            content: '';
            position: absolute;
            width: 0;
            height: 0;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-bottom: 10px solid #ccc;
            top: -10px;
            left: 50%;
            transform: translateX(-50%);
            display: none;
        }
        .box.active::after {
            display: block;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="container">
            <div class="box" v-for="(item, index) in boxes" @click="toggleBox(index)" :class="{ active: item.active }"></div>
        </div>
    </div>
    <script>
        new Vue({
            el: '#app',
            data: {
                boxes: [
                    { active: false },
                    { active: false },
                    { active: false },
                    { active: false },
                    { active: false }
                ]
            },
            methods: {
                toggleBox(index) {
                    this.boxes[index].active = !this.boxes[index].active;
                }
            }
        });
    </script>
</body>
</html>